package com.city.itis.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.city.itis.dao.MemberCategoryDao;
import com.city.itis.domain.MemberCategory;
import com.city.itis.service.MemberCategoryService;

/**
 * 会员类别业务层实现类
 * @author WY
 *
 */

@Component("memberCategoryService")
public class MemberCategoryServiceImpl implements MemberCategoryService 
{
	
	private MemberCategoryDao memberCategoryDao;
	

	

	public MemberCategoryDao getMemberCategoryDao() 
	{
		return memberCategoryDao;
	}
	@Resource
	public void setMemberCategoryDao(MemberCategoryDao memberCategoryDao)
	{
		this.memberCategoryDao = memberCategoryDao;
	}

	@Override
	public int add(MemberCategory memberCategory)
	{
		return  memberCategoryDao.save(memberCategory);
	}

	@Override
	public int delete(MemberCategory memberCategory)
	{
		return  memberCategoryDao.delete(memberCategory);
	}

	@Override
	public int deleteById(Integer id)
	{
		return  memberCategoryDao.deleteById(id);
	}

	@Override
	public int modify(MemberCategory memberCategory) 
	{
		return  memberCategoryDao.update(memberCategory);
	}

	@Override
	public MemberCategory getMemberCategoryById(Integer id) 
	{
		return  memberCategoryDao.getMemberCategoryById(id);
	}
	
	@Override
	public MemberCategory getMemberCategoryByMemberCategory(
			String memberCategory) 
	{
		return this.memberCategoryDao.getMemberCategoryByMemberCategory(memberCategory);
	}

	@Override
	public List<MemberCategory> findAll() 
	{
		return  memberCategoryDao.findAll();
	}
	

	
}
